php forum
php mysql forum
php mysql smarty
 
Page 1 of 9 1 2 3 4 5 6 7 8 9 >
Topic Options
#199601 - 04/01/03 10:53 PM [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
* Updated September 15, 2005
ubbnews.php
Modification and Redistribution of this code without perission is prohibited
The Official Code can be found at http://www.ubbdev.com/ubb/ultimatebb.php/topic/33/42.html

Reads the UBB for the latest topic in a forum, and displays a teaster of it on a page
Required Parameter -- forum=## where ## is the forum number requested
Optional Parameter -- threads=# where # is the number of threads to tease (5 limit)
Optional Parameter -- surl=1 will turn on Spider Friendly URLs (Requires 6.7.x)

Usage: just do an include with "http://yourdomain.com/path/ubbnews.php?forum=##&threads=X(&surl=1)" where ## is the number of the forum without any leading zeros and X is a number between 1 and 5. You will need to put your noncgi path in the script so it may read the vars_config.inc.php for your UBB paths.
Download: UBBDev
Requires: 6.4+

Features:
- Counts your comments and puts the count next to the Comments Link
- Comments Link will give them UBB Reply Screen
- Read More takes them to the entire topic
- Will display 1 topic of no threads=X is added to the URL
- Feed multiple forums by doing multiple includes of the ubbnews.php
- Will NOT feed private forums
- Will display a message if your forum_##.threads file is missing
- Author's name links to their profile
- Spider Friendly URLs

Known Issues:
- Doesn't process Gramelins This can be corrected by placing ubbnews.php in your noncgi directory
- Sometimes doesn't process URL's correctly (I've seen it on rare occasions, but bumping the Max Characters setting noted in the code should cure it)
- You will receive a missing .threads error message after an upgrade. Rebuild your Forum Metadata on that forum to correct this error.

This may/may not work on earlier versions, so use at your own risk.

I put a hard limit of 5 in the PHP code to prevent the code from trying to tease every topic in the forum (Could kill performance). You can change this by editing
Code:
       if ($threads > 5)
          $threads = 5;
just change the 5 in both lines to whatever you want to cap it at. I honestly don't see a need to be over 10.

Also, this may show a bit of lag if you have thousands of topic in the forums. I haven't tested this on large forums.

August 26, 2005 Notice
UBBFeed was an unauthorized modification of the UBBNews code and I will provide NO support for UBBFeed, or my code contained in it. Posting here for support of UBBFeed will result in an unpleasant response.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199602 - 04/01/03 11:18 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Any demo (of what you have so far)? This sounds very promising. If you can get it so that the user can determine how many "teasers" that are displayed (other than default "1") that would be cool. smile
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#199603 - 04/02/03 12:59 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
demo: http://thegeeksinc.com/

nice work Ron laugh the graemlins shouldn't be too difficult, I believe we worked through them for ubbnews and for a threads mod smile
_________________________
- Allen wavey
- What Drives You?

Top
#199604 - 04/02/03 04:50 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Quote:
quote:
Originally posted by AllenAyres:
demo: http://thegeeksinc.com/
OOPS...I feel quite <-- thumbsup
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#199605 - 04/02/03 08:26 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Thanks guys smile

I only wanted to tease one thread (the latest) but it could probably be modified to do more. You can feed more than one forum by doing multiple includes of the .php
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199606 - 04/02/03 03:20 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Quote:
quote:
Originally posted by Sub Zero:
the vars_config.inc.php for your UBB paths.

Feel free to suggest any improvements to the code, as I'm still learning PHP smile This may/may not work on earlier versions, so use at your own risk.
vars_config.inc.php is different in 6.4, so i any one wants to use it on 6.4.x u have to change the link towards the the topic.

Top
#199607 - 04/06/03 10:26 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
6.5 Zip File Updated with a bugfix - ultimatebb.cgi was not in the URL

Patch: Add /ultimatebb.cgi before ?ubb= on lines 52 and 56
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199608 - 04/13/03 01:21 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
changing the
to
would fix the xhtml-compliance smile

What do you see when you have graemlins in the post sz? some html? <img src=" etc?
_________________________
- Allen wavey
- What Drives You?

Top
#199609 - 04/13/03 02:00 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
The best way to check if it cuts any HTML command (including graemlins, images, etc) is to check the number of <'s in comparison to the number of >'s, and if there are more <'s just remove everything after the last <, including it.

For example if it is:
Quote:
quote:
This is a sample sentence! <b>Welcome</b> to our board! <img src="gr...
Then it can see there are 3 times "<", but only two times ">", so it removes everything after and including the last <, which is "<img src="gr..."
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#199610 - 05/24/03 04:28 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Stamoulis Offline
Member

Registered: 09/17/01
Posts: 92
Loc: Germany
its not really working for me on 6.4, what do I do wrong confused

http://www.greek-forum.de/ubb/ubbnews.php?forum=46

Top
#199611 - 05/29/03 10:49 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Sorry for the slow reply. I checked it out. You are running 6.4.0.1, and I wrote this on a 6.5 board, so there might be some differences, but it should work.

Also, you really should get your host to upgrade your PHP as you are running 4.0.6. The exact problem is the way I get the query string (?forum=46) must not be recognized on the older version of PHP. Either way, I would recommend upgrading the PHP as there are some vulnerabilities fixed.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199612 - 05/29/03 11:16 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Stamoulis Offline
Member

Registered: 09/17/01
Posts: 92
Loc: Germany
hmmm it's my own server so I have to upgrade it by my own, oh well, i will try this then wink tipsy

Top
#199613 - 08/25/03 08:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Sub, anyway to have it relay the last 5 or so stories?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199614 - 08/27/03 08:35 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Right now, it only teases one. When I figure out a sane way to parse the necessary files, I will expand it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199615 - 08/27/03 09:49 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ok, can't wait to see it smile ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199616 - 09/13/03 07:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
The Zip file has been updated with a new version that now allows a tease upto 5 topics.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199617 - 09/13/03 09:59 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
yey! anyway to make it 15 :x
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199618 - 09/13/03 10:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
nm, i see it :x... thanks sub!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199619 - 09/14/03 12:05 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
The limit is in there to prevent someone from trying to crash the server by doing threads=99999 smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199620 - 09/16/03 02:36 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
yeh, i see how to mod it to allow what i need, I love this mod, now I can begin to use it for my implimentation of taking over the world... err umm news posting...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199621 - 09/17/03 01:04 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
I realize that this is for 6.5 and 6.6 but I figured 6.4 *might* work so I gave it a shot and I set it to forum 9 (announcement) and threads =5 and it comes up blank. If I put ubbnews.php?forum=9 then it gives me one thread and it seems to pull it up from last year. Any ideas?
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199622 - 09/17/03 09:42 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
if i had ftp access to my domain from here, and if my domain wasn't blocked from here i'd test it, but i'm not expecting my laptop back till next week smirk...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199623 - 09/17/03 08:07 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
Quote:
quote:</font><hr />Originally posted by twslex:
<blockquote><font class="small">quote:
[qb]Originally posted by Sub Zero:
the vars_config.inc.php for your UBB paths.

Feel free to suggest any improvements to the code, as I'm still learning PHP smile This may/may not work on earlier versions, so use at your own risk.
[/qb]
vars_config.inc.php is different in 6.4, so i any one wants to use it on 6.4.x u have to change the link towards the the topic. <hr /></blockquote>Can we get a little more detail on how to get it to work with 6.4?
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199624 - 09/17/03 10:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Ok... I haven't tested it with 6.4 but assuming the metadata formats haven't changed it should work.

Regarding pulling the old thread, rebuild the forum stat files for that particular forum and see if that cures it. If not, I'll have to figure a way to handle metadata being out of order. Maybe something of using the lastnumber and counting backwards and searching for existing files.

doing ubbnews.php?forum=9&threads=5 should pull 5 threads and tease them.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199625 - 09/17/03 10:40 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
Thanks, I'll work on it. I appreciate the reply!!

edit: the stat rebuild didn't help and the threads=5 still just pulls one old thread up. Thread it pulls is consistent though. Here's the link I'm trying;

http://www.netwerkin.com/noncgi/ubbnews.php?forum=9&threads=5
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199626 - 09/17/03 11:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Lemme dig up a 6.4 zip and I'll install it locally and see if I can't sort it out. I wrote this during 6.5, so I never got a chance to run it on 6.4.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199627 - 09/17/03 11:16 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
You are the man, I hope I'm not causing too much trouble. I want to upgrade but I don't want to kill the look I have at Netwerkin right now and it's a pain to build.
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199628 - 09/17/03 11:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
I got the threads to show 5 but they are still old ones. I had made a mistake while editing the page.
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199629 - 09/18/03 10:08 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Aye! The forum_XX.threads files in 6.4 aren't in sync like the 6.6 files(The ones on my 6.6 board are sorted in numeric order which makes for clean processing of the array). The way I wrote this, I take the .threads, pop the bottom rows off, then invert the array so I can process it in reverse order. It looks like with 6.4, I need to sort the array myself before processing it.

Let me see what I can cook up for porting this mod back to 6.4....

On a positive note, you helped me solve the graemlin processing problem. Drop ubbnews.php into the noncgi directory. I call mine out of the root because it is with the rest of the PHP scripts that power the main page on my site.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199630 - 09/18/03 03:57 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Fair warning: The fact that hashes are alpha-sorted in 6.6 is actually a bug. I meant to turn that off. 6.6.1+ corrects this. tipsy
_________________________
UBB.classic: Love it or hate it, it was mine.

Top
#199631 - 09/18/03 04:04 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Damn...It makes metadata much easier to examine.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199632 - 09/18/03 04:16 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Eh, it's not so bad. The fact that alpha-sorted forums will use a date-sorted .threads file in 6.7 will make up for it. (Meaning alpha-sorted forums will be able to be pruned, mass moved from, and have CIs stuck on them, in addition to your routines being able to work with them.)
_________________________
UBB.classic: Love it or hate it, it was mine.

Top
#199633 - 09/19/03 10:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
ok, I've gotten as far as this

http://www.alforadmin.com/ubb/ubbnews.php?forum=10&threads=5

shocked How do I include it in a webpage?

Top
#199634 - 09/19/03 11:41 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
just do a

Code:
<? include("http://www.alforadmin.com/ubb/ubbnews.php?forum=10&threads=5"); ?>
Now to start rewriting the fetching engine so it can properly sort the .threads file smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199635 - 09/20/03 12:07 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
smile Thank you, I got it working here http://www.alforadmin.com/ubb/index.php

Top
#199636 - 09/21/03 04:22 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
That has a nice look to it Al.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199637 - 09/21/03 08:21 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Updated the zip with a sorting bugfix which pulls old topics.

Randy, this should work with 6.4 now smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199638 - 09/21/03 08:32 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
RandyM Offline
Spotlight Winner

Registered: 06/28/01
Posts: 2642
Loc: Southern California | Guitar o...
Thank you SO much. I've been building a 6.6 upgrade kit for Netwerkin but it's weeks away and I've been dying to have a front page again. Netwerkin used to be rather large but I moved the tutorials etc. to www.randymcelroy.com (my personal site).
_________________________
3 time Spotlight winner.
Believe The Lie

Top
#199639 - 09/22/03 11:14 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Between the news feeder and CIs, you should be able to build one in no time smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199640 - 09/22/03 09:01 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I found an, odd, bug...

When you view the script here and compaire it to my forum #6 it pretty much pick and chooses which stories it wants to use...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199641 - 09/22/03 09:08 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Quote:
quote:
Originally posted by Gizzy:
I found an, odd, bug...

When you view the script here and compaire it to my forum #6 it pretty much pick and chooses which stories it wants to use...
It's based on when the topic is made, not when it was last replied to.

Look at the links, it's t=290,291,292,etc

Top
#199642 - 09/22/03 10:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
You know, i figured that AFTER i actually glanced through the posts lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199643 - 09/23/03 07:30 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
I love how you did it so you can't tease private forums (not the most graceful way to do it, but works nonetheless)

http://www.undergroundnews.com/ubbnews.php?forum=16&threads=5

Top
#199644 - 09/23/03 08:11 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Yeah...I should probably add some error handling in it to quelch the ugly errors...

The nice thing is the .threads for private forums are tucked away in the private directory. Not to meniton it would require opening vars_forums.cgi, and doing an authentication check before displaying anything. Can get just plain ugly at that point.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199645 - 09/23/03 08:24 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Here's a patch to cure that and a missing .threads error

Before
Code:
$thread_data = file($threadspath);
Add
Code:
if (file_exists($threadspath)) {
and After
Code:
$thr_array = $threads--;
Insert
Code:
        } else {
        $thr_array = 0;
        echo "Unable to read .threads file.  Either you are trying to access a private forum, or you need to Rebuild your forum stat files.";
        }
I'll upload a patched zip shortly.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199646 - 09/23/03 08:51 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I have an error :x.. When users use
Code:
[quote][/quote]
in a post, and it's set to trunicate the posts after so many characters it displays the rest as quoted since the ending of the quoted text was trunicated.

http://www.undergroundnews.com/ubbnews.php?forum=6&threads=5
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199647 - 09/23/03 10:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I'll add it to the known issue list.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199648 - 09/26/03 11:34 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Found another:

When there is only one forum and the requested is 5, it errors out, granted that there is no data for it to retrieve...

Quote:
quote:
Posted by
Posted:


Read More...

Comments (-1)


Warning: file(/var/www/html/ubb/Forum26/.cgi): failed to open stream: No such file or directory in /var/www/html/ubbnews.php on line 54
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199649 - 09/27/03 12:30 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
quick question, is it possible to have the username as a link to the users profile?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199650 - 09/29/03 04:02 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Regarding first report - I'll look into that one. I'm probably going to have to do some sort of array count to see how many topics.

The 2nd one. Well... The usernumber is already in the A line so it isn't hard to assemble the name as a URL and display. I suppose I could whip that up this evening. Doesn't look like that would be too difficult.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199651 - 09/29/03 08:59 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip File Updated with the member name now linking to their profile.

Still looking at the topic counting issue.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199652 - 09/29/03 10:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip File Updated patching the topic counting bug.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199653 - 09/30/03 01:04 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
hummm, sub, can you post these fixes lol... i hate doing customization then having an update lol
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199654 - 09/30/03 01:10 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ok, I have a new one! How about filtering out the edited by statement...

[ September 29, 2003, 11:40 PM: Message edited by: Gizmo ]

for example...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199655 - 09/30/03 09:10 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Lemme look at the topic files and see how it is in the Z lines. I'm not sure if there will be a sane way to do it...

I'll rustle up the code changes and add those. It's only about 7 new lines that fix both of the above issues.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199656 - 09/30/03 09:49 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
sweet, work on the quote issue, it'll make us all feel a lot better :x...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199657 - 09/30/03 12:44 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
smile and lists... they mess up too

Top
#199658 - 09/30/03 12:56 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I'll get it on the bug list to look into/fix.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199659 - 09/30/03 02:11 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Quote:
quote:
Originally posted by Weird Al:
smile and lists... they mess up too
the lists? lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199660 - 09/30/03 03:04 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
http://www.alforadmin.com/ubb/index.php

Look at the top news... and the "Read more".. it's added to the [list]

Top
#199661 - 09/30/03 05:05 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
hmmm...looks like I need to see if there are open list/quote tags and close them in the tease. This should be interesting.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199662 - 10/02/03 12:36 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Hey Sub, here's a quick beta of what i've done with your script (yeh i know it's still kinda lame/buggy) UGN Security Test Page
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199663 - 10/02/03 11:24 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Quote:
quote:
Originally posted by Gizzy:
Hey Sub, here's a quick beta of what i've done with your script (yeh i know it's still kinda lame/buggy) UGN Security Test Page
*cough* mine works with the Colorforums hack *cough*

http://www.alforadmin.com/ubb/index.php tipsy

Top
#199664 - 10/02/03 03:30 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I don't need color forums hack though, mines just for my main page's content...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199665 - 10/02/03 03:32 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Sub, i found another error :choff:...

before you say it's one of my mods to it a clean copy my modded copy .

My issue is this, it doens't always update and i'd hate to have to rebuild my forum statistics to get it to update all the time... We have like 20 posts from today and it's not showing any of them...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199666 - 10/02/03 05:27 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Did you do fetch the one with sort fix Gizzy? If not, I'll put the sort patch up here. If you did, then I'll need to look and see why it has gone insane.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199667 - 10/02/03 05:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
sub, the clean.php is the one i just downloaded :x...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199668 - 10/02/03 08:03 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Aye Aye Aye....I'll have to see if I remembered the sort fix in the zip on my server. If I did...welllll..I've got a problem
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199669 - 10/02/03 10:04 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
lol, i can't wait to get it working frown ... spent a bit of time customizing it lol, it'll pull the site together a bit...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199670 - 10/02/03 10:32 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Doh!

I forgot to commit the sort fix to the released version. I had it on my production version.

I'll fix the zip.

Patch:

Find:
Code:
        $thr_data = array_reverse($thread_data);
Replace with:
Code:
$thr_data2 = array_reverse($thread_data);
array_pop($thr_data2);
sort($thr_data2);
$thr_data = array_reverse($thr_data2);
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199671 - 10/03/03 12:03 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
mmm, makes it work perfectly! Now to get the quotes fixed :x... thanks smile
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199672 - 10/22/03 01:13 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Stamoulis Offline
Member

Registered: 09/17/01
Posts: 92
Loc: Germany
i dont get confused

on my test forum it runs well:
http://www.greek-covers.de/ubbtest/ubbnews3.php?forum=1

(ubb 6.6.1 - apache server)

on my regular forum it just says
Quote:
quote:
Unable to read .threads file. Either you are trying to access a private forum, or you need to Rebuild your forum stat files.
http://www.greek-forum.de/ubb/ubbnews2.php?forum=1

(ubb 6.6.1 - apache server)

it's the same software, the same script all the same but no work confused

why is that like this ?! frown

Top
#199673 - 10/22/03 09:35 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
rebuild your forum stat files then try it, I had the same issue and it cleared it up quite quickly.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199674 - 10/25/03 04:03 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
For anyone running this who wants to use smilies in their news, you can use the
Code:
<BASE href="http://www.undergroundnews.com/ubb/">
to point to your ubb directory in your page that you're including from. Be sure however that in that document that you're linking directly to any images/pages/css that you have in the document since it'll look for them in your ubb directory. This is of coarse if you don't want to use a php implode to display your news and just want to use a common include.

Sub, as a sugguestion, perhaps have it so that the location of images loaded through your script is passed through the script and pointed back to the ubb directory?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199675 - 10/27/03 10:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
The script already can see the NonCGI directory path via the UBB's config.inc.php (Line 7: include("$varspath/vars_config.inc.php");) so it shouldn't take much to get the path to the images. I've been swamped with other development so I haven't had a chance to look at the known issues lately. I have injected some code in my dev version to try to squash the list/code/quote problems but I haven't even touched that in a couple weeks.

Another alternative is to drop the ubbnews.php into your UBB's noncgi directory.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199676 - 10/27/03 11:25 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Sub, if you use a php include it doesn't matter where it's placed, it'll call the paths from that location.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199677 - 11/18/03 09:58 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
:bump: any hope on an update sub?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199678 - 11/20/03 09:17 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
For those of you wondering how to customize the script's output, check here
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199679 - 11/24/03 07:34 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I think the quote/list/code issue is mostly squashed. Let me beat up on my beta version a bit more. I finally had a few days to do some development.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199680 - 11/24/03 10:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
ya know you're really going through too much trouble. All I did was change the layout so that the Read More, etc links were in the next cell. blockquote, lists, etc don't pass through that. So essentially the only reason to update the script is for html compliance

Top
#199681 - 11/25/03 06:40 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
yeh well, others that use stock quote woudln't wanna be thrown off by the page lookin like crap :x...

Sub, daddy tipsy , when you finish could you post a list of changes lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199682 - 03/02/04 09:36 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
So, about the beating up of the beta version :x...

BTW, for the gramelins, could you have it just define a url when it sences a gramelin's usage? Say using noncgiurl/gramelins/gramelin.gif
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199683 - 03/02/04 10:28 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I kind of got sidetracked on the ubbnews.php after a couple of major projects cropped up this past fall. I'm getting this back on my whiteboard to address/look into further.

A workaround for the graemlin problem is to drop ubbnews.php in the noncgi directory. I'll have to examine the Z lines a bit more to determine if I can do a replace on the graemlins, or somehow break it apart and insert in the noncgi url from the vars_config.inc.php.

Regarding the quote/code/list fix, I have a tempoary one, however, it doesn't handle multiple lists correctly. I'm going to rethink the code that I injected last fall into my beta version. I think I'm going need to do a string find and count, then compare the open and close counts and append the appropriate number of closing tags.

If you want, I can post my current temporary fix, but I'll need to do further testing on my boards after I write a more permenant fix. I have an idea about how to do a more permenant fix, I just need to code and test it on my boards before I release it. It's not going to break the UBB, I'd just rather break my beta directory than anyones live sites.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199684 - 03/02/04 10:58 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
That's not a vaild workaround... If you use a php include to load the page into a document it'll load all data from that called position. Example:

http://www.undergroundnews.com/ if I use a PHP call to load from http://www.undergroundnews.com/ubb/news.php on the main page of http://www.undergroundnews.com/ it'll still look for the gramelins in http://www.undergroundnews.com/ and not http://www.undergroundnews.com/ubb/.

'eh I can wait till an official live version is available lol... I run it so much at my site, with some customizations it's used for site news/rants/tech news/main page/store news.

Just wanted to be sure you were alive :x...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199685 - 03/02/04 11:20 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I'm still alive.

I've been playing in Zend with the quote/code/list (Gotta love the Preview of the HTML and the ability to set breakpoints to examine varaible content). I did concept up a method of counting the open tags, and automatically closing the tags at the end of the teaser, regardless of where they are supposed to close. I'll probably be able to test that on a live board shortly.

The problem I'm running into on the gramelins is doing an outright replace on the img tags. If I append $NonCGIURL to all image tags, it would break any outside images in the feed. On the other hand, I cannot be guaranteed that I'm able to read /cgi-bin/vars_graemlins.cgi due to open_basedir restrictions. If I can be sure that I can read vars_graemlins, I can do some array work to "trim the fat" of the hash, and get it so I have just the graemlin image file names, and just do a search and replace on those file names. I could just include a base href, but would that break other parts of the page that it is feeding onto. That, I'm unsure of also.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199686 - 03/02/04 11:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
perhaps have it compaire where the url is linking to? or if the url is linking to a directory named gramelins?

Yeh I'm using a base href, it's a pain in the butt... I had to recode parts of my entire news pages just to run this and have gramelins show lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199687 - 03/02/04 11:37 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Not all graemlins are in /noncgi/graemlins. Some are in /noncgi...

Oh, and here's some beta code for the quote bug:

Find:
Code:
     $postdet = substr($postdet,0,strlen($postdet)-strpos(strrev($postdet),$aspace));
Add After:
Code:
     $bot = substr_count($postdet, "<blockquote>");
     $bct = substr_count($postdet, "</blockquote>");
     if ($bot > $bct) {
     	while($bot > $bct) {
     		$postdet = $postdet . "</blockquote>";
     		$bct++;
     	}
     	$nodots = "TRUE";
     }
    $lot = substr_count($postdet, "<ul");
     $lct = substr_count($postdet, "</ul>");
     if ($lot > $lct) {
     	while($lot > $lct) {
     	$postdet = $postdet . "</ul>";
     	$lct++;
     	}
     	$nodots = "TRUE";
     }
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199688 - 03/07/04 10:37 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
Quote:
Originally posted by Sub Zero:

- Will NOT feed private forums


I require my users to login, but i guess that will work?

Another question:

$varspath = "/path/to/noncgi";

Is it an absolute path or relative to webserver root? I´m running on Windows2000-server, could you give an example?

"/inetpub/wwwroot" or "c:inetpub..." or is it a webpath?

Top
#199689 - 03/07/04 10:41 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
go into your CP and see what you have entered for your Non CGI Path.

Enter that

Top
#199690 - 03/07/04 08:03 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Eric,

1. You'll be able to use this, so long as your news forum is NOT a private forum (yes your board is closed, but a private forum is one that only restricted users such as admin/mod/ones you deem worthly can access).

2. It's a server path not web path. As Ian said, it'll be what's in your board configuration.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199691 - 03/17/04 12:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
Tried, but running ubbnews.php only displays a blank page.

Top
#199692 - 03/17/04 12:39 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
in ubbnews.php, try changing

Code:
include("$varspath/vars_config.inc.php");
to

Code:
include("vars_config.inc.php");

Top
#199693 - 03/17/04 01:25 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
No luck, still blank!

Top
#199694 - 03/17/04 10:49 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Are you sending proper parameters??
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199695 - 03/18/04 02:39 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
http://mydomain.com/noncgi/ubbnews.php?forum=12
for example

gives me nothing;

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>  

Top
#199696 - 03/18/04 02:41 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
Running Windows 2000.

Top
#199697 - 03/18/04 10:07 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
odd, I don't think ubbnews is supposed to print any of that, as it's meant to be included in another page.

Have you modified any of the code?

Top
#199698 - 03/18/04 10:37 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
You can call it directly for testing, however it is meant to be used in an include() in a PHP page.

http://thegeeksinc.com/ubbnews.php?forum=34&threads=3

Dumb question - Do you have the PHP Accelerator enabled???
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199699 - 03/18/04 10:55 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
No modification, only tried changing the path you suggested before.

Yes, I have the PHP accelerator enabled, and it is working.

Maybe something with the PHP installation? I´ll have the guy that installed it to have a look at this issue. If you don´t have any other clues?

Top
#199700 - 03/18/04 02:08 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
I just don't see any reason why it's printing out the
Code:
<html><body></body></html>
and nothing else. I can't find anywhere in the code where it tells it to print that out

Top
#199701 - 03/18/04 02:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Can you post a URL to your ubbnews.php like my one above? Also a URL to your forums would be helpful.

I'm not outputting any DOCTYPE, HEAD, or BODY tags with ubbnews.php because I do an inculde("$siteroot/ubbnews.php?forum=34&threads=2"); in my index.php to get the feed. ($siteroot is a variable from my index.php script I use to define my root directory path)

If I can't see anything wrong with those, I'll either write some diagnostic code or have you send me your configured ubbnews.php and your vars_config.inc.php
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199702 - 03/21/04 05:49 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Sub, if you ever want to turn the times into a format that is adjusted via users preference, I wrote this js function that takes the normal 12-31-2004 08:42PM

and turns it into something workable.

Code:
<script language="Javascript" type="text/javascript">
<!--
function formatTime(input) {
var tippy = input;
var tippy_array = tippy.split("-");
var month = parseInt(tippy_array[0]) - 1;
var day  = parseInt(tippy_array[1]) + 0;

   if(tippy_array[2] != null && tippy_array[2] != '') {
	var new_array_tippy = tippy_array[2].split(" ");
	var year = parseInt(new_array_tippy[0]);

	var newer_array_tippy = new_array_tippy[1].split(':');

	hour = parseFloat(newer_array_tippy[0]);

	if(new_array_tippy[2] == 'PM'){	hour += 12; }
        var minutes = parseInt(newer_array_tippy[1]);
   	document.write('<span class="time">');
	document.write(timestamp(new Date(year,month,day,hour,minutes,0), dfrm, null, 0, 0, 0, 0), "at ");
	document.write(timestamp(new Date(year,month,day,hour,minutes,0), null, tfrm, 0, 0, 0, 0), '</span>');
   }
}
//-->

</script>

Top
#199703 - 03/22/04 03:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Eric Flyxe Offline
Member

Registered: 05/03/01
Posts: 57
Sub Zero: Coming by PM!

Probably something with my php installation, which i didn´t do myself. Will check that too, this week.

Thanks!

Top
#199704 - 03/22/04 10:27 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Quote:
Originally posted by Ian Spence:

I just don't see any reason why it's printing out the
Code:
<html><body></body></html>
and nothing else. I can't find anywhere in the code where it tells it to print that out


If there is no query string found, it bugs out and outputs nothing. It seems that IE/Moz like to invent tags when none exist.

I've PM'd Eric with a different (and less cluttered) method of fetching the query string to see if that cures the problem.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199705 - 03/22/04 01:57 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip file updated to include the following fixes:
- A fix for the quote/code/list problems
- Fix for the IIS Query String bug
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199706 - 03/22/04 02:47 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
:hopes for gramelins to be worked out: :hopes hopes hopes: heh...

I have an idea... Possibly have in the code and if/else statement, have it so that if it sees one of the core smilies stored in the noncgi dir it loads that path to it, else if it's not one of those and a path isn't presant it searches in the gramelins dir...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199707 - 03/22/04 03:34 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
work at it this way.

IMG tags only allow full urls, and graemlins use relative paths.

Do something like

Code:
$message = pregreplace("/src="Graemlins//", "src="$NonCGIURL/Graemlins/", $message);
That's untested, and should only work with custom graemlins. You could also try something like
Code:
$message = pregreplace("/src="biggrin.gif/", "src="$NonCGIURL/biggrin.gif", $message);
for each of the built in graemlins.

Top
#199708 - 03/22/04 03:53 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I ran into a couple of things when looking at the graemlins:

1. the vars_graemlins.cgi looks difficult to parse via PHP
2. I cannot even be sure that I can read vars_graemlins.cgi due to open_basedir restrictions

So how do I determine what is a graemlin, and what is not without knowing what graemlins exist?
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199709 - 03/22/04 04:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Quote:
Originally posted by Sub Zero:</font><hr />
So how do I determine what is a graemlin, and what is not without knowing what graemlins exist?
<hr /></blockquote>

<blockquote><font class="small">Originally posted by Ian Spence:
[qb]
work at it this way.

IMG tags only allow full urls, and graemlins use relative paths.

Do something like

Code:
$message = pregreplace("/src="Graemlins//", "src="$NonCGIURL/Graemlins/", $message);
That's untested, and should only work with custom graemlins. You could also try something like
Code:
$message = pregreplace("/src="biggrin.gif/", "src="$NonCGIURL/biggrin.gif", $message);
for each of the built in graemlins.
[/qb]
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199710 - 07/05/04 04:10 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
ok, I'm trying to put together a page that includes this news feed. For some reason, if I have any includes or scripts (such as content islands) after the one that calls this one, they don't work. If they come before it, they work OK. Any idea why that might be and what I can do about it?
_________________________
my board :^)

Top
#199711 - 07/05/04 04:56 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Can you post a Demo URL, and how you are doing the include?
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199712 - 07/10/04 05:31 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
ok, here's the URL...

http://www.alex.to/experiment/virtual.html

and here's the code:

Code:
                       <!--#include virtual="/ubb/ubbnews.php?forum=1&threads=2"-->
                         
                        <!--#include virtual="/ubb/ubbnews.php?forum=6&threads=3-->

<!--#include virtual="/ubb/ContentIslands/1/html.html" -->

<script src="http://www.alex.to/ubb/ContentIslands/1/html.js"
language="Javascript1.3" type="text/javascript"></script>
see what I mean? Nothing below the ubbnews lines shows up.
_________________________
my board :^)

Top
#199713 - 07/10/04 06:01 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
it's a PHP include, I don't think a virtual include will work... although I can't read anything on that page anyway

Top
#199714 - 07/10/04 06:18 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
thanks, that was what I needed to figure it out!
_________________________
my board :^)

Top
#199715 - 07/10/04 08:20 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
ok, I got it to do what I wanted it to laugh

http://www.alex.to/doomlink
_________________________
my board :^)

Top
#199716 - 07/11/04 02:47 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Not half bad wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199717 - 07/11/04 09:28 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
looks absolutely nothing like eve, not at all wink

Top
#199718 - 07/11/04 10:21 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
thank you... i think... what is eve???
_________________________
my board :^)

Top
#199719 - 07/11/04 10:30 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Been to infopop.com lately? lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199720 - 07/11/04 11:52 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
no, I guess I hadn't eek Well any resemblance is purely coincidental, I was actually more inspired by this site. laugh
_________________________
my board :^)

Top
#199721 - 07/12/04 07:19 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
sooo... how hard would it be to modify UBBNews so that it takes the last post of any thread, rather than the first, and picks the topics by newest post, rather than newest original topic?
_________________________
my board :^)

Top
#199722 - 07/12/04 09:45 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I haven't looked into that, as it was designed as more of a News function than an expanded content island. I'm pretty sure there is some metadata somewhere that stores that data. Then it would be a matter of parsing the metadata, looking up the topic file, fetching the appropriate Z line, and printing it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199723 - 07/14/04 06:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
thanks... definitely way beyond my abilities!
_________________________
my board :^)

Top
#199724 - 07/15/04 03:02 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
This is the best script to learn customization on; with a few tweaks you can have it post every line in the post :x... Then theres the customization of having it work with bookmarks (#postid) like I have at UGN Security ... The script is deffinately a time saver wink ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199725 - 07/15/04 05:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I do have a new version of this as a PHP function which utilizes the spider friendly functions of the latest version of UBB, but it's acutally a function instead of an include (part of a bigger change I'm working on with my site). I could probably move the code into the .php and still use release it...

Jumping to the latest post in the topic. Now that's an idea....
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199726 - 07/15/04 06:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Lol, here we're waiting on new releases and you've totally redone it :-x... Hey, so long as theres no bugs, it's smaller, and more efficient, can't hurt to release it wink ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199727 - 07/15/04 07:12 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
So far, the only real change besides converting it to a function in my UBB class file is the spider friendly. I may try to stick a "Hop to Last post" in it. I'm also looking at adding some Javascript for the times that was posted earlier in the thread. I'm also thinking about a couple of layout changes to it...
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199728 - 08/13/04 03:07 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
bryan868 Offline
Member

Registered: 09/18/00
Posts: 273
Is this hack what's being used for the news at www.ubbdev.com?
_________________________
This is the designed behavior.

Top
#199729 - 08/13/04 01:22 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
No, UBBDev is using something else for news (should be a perl news modification).

Sub, sounds good; I'd love to see a function for "hopping" to the story; see what I have at UGN Security ... As is I have this addon twice (news.php and header.php); be cool to "consolidate" wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199730 - 08/13/04 02:40 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Hey Gizzy, would you mind shooting your code to me to peek at? I would like to see what kind of tweaks you have made to it. I might actually incorporate some of them if you don't mind wink

Also, you shouldn't have to have 2 separate instances of the PHP, you should just be able to include it twice on the page with different query strings. That is unless you are doing different layouts, then you would need to.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199731 - 08/14/04 02:06 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Well see the one (headlines.php) is just "jump down" links to the data displayed... But no problem; get it here .

I know it's all pretty dirty but still gets the job done...

Hit me up on AIM (lordmoguai) or IRC (irc.undergroundnews.com #undergroundnews) if you need me.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199732 - 08/14/04 11:03 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
While I do some thinking, here's how you can spider friendly those links (assming you can use the short version safely):

Find:
$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;

Replace with:
$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;

Find:
$authorurl = $CGIURL . "/ultimatebb.cgi?ubb=get_profile;u=" . $authorid;

Replace with:
$authorurl = $CGIURL . "/ultimatebb.cgi/profile/" . $authorid;

Find:
$commentpath = $CGIURL . "/ultimatebb.cgi?ubb=reply;f=" . $forum . ";t=" . $topicnum;

Replace with:
$commentpath = $CGIURL . "/ultimatebb.cgi/ubb/reply/f/" . $forum . "/t/" . $topicnum;
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199733 - 08/14/04 02:29 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Interesting, I'll get it installed when i have some free time wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199734 - 08/14/04 02:42 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Well, that's done; works nicly, thanks smile .
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199735 - 10/02/04 06:02 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
DocDoom Offline
Member

Registered: 09/09/01
Posts: 64
just wondering... is there a way to create hidden forums that can contain topics that will show up in ubbnews, but will *not* show up in the "today's active topics" list?
_________________________
my board :^)

Top
#199736 - 10/06/04 04:01 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
With the stock behavior, no. That was a safety feature implemented to prevent people from farting around and trying to get private forums.

Reading private forums isn't hard to hack in. You would need to know the forum key, as you cannot count on always being able to read vars_forums., then it is a matter of assembling the path, and parsing the appropriate files.

Keep in mind, if anyone knew the URL to the page, your private forum topics would be compromised, hence the reason for the current behavior.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199737 - 10/06/04 04:25 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
from my experience, if you set a forum as hidden, but not private, you should be able to use the feed for it. Although as Sub said, it's not a well hidden forum is we all know where it is wink

Top
#199738 - 06/04/05 06:42 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
for those who still use this, I've been rewriting my scripts and wrote this function up

Code:
function fix_smilies( $string )
{

	$string = preg_replace('/src="graemlins//', 'src="/ubb/graemlins/', $string);
	$string = preg_replace('/src="([^/]+?)"/', 'src="/ubb/$1"', $string);

	return $string;
}
change the 'ubb' if your noncgi directory is named something else

Top
#199739 - 06/04/05 11:06 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
grazi smile
_________________________
- Allen wavey
- What Drives You?

Top
#199740 - 08/23/05 08:39 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
OK,

been playing around with this one, now the latest threads do not come up, but the threads with the latest posts.

Code now looks like this, i have renamed it into ubbnews2.php:

Code:
<?
// ubbnews2.php
// Reads the UBB for the latest topic in a forum, and displays a teaster of it on a page
// Required Paramater -- forum=## where ## is the forum number requested
// Optional Paramter  -- threads=# where # is the number of threads to tease (5 limit)

$varspath = "<NonCGIPath>";  # Take this from the NonCGI Path setting in your cp.cgi
include("$varspath/vars_config.inc.php");

$forum = $_GET['forum'];
$threads = $_GET['threads'];
$threads = (isset($threads) && $threads) ? $threads : 1;

// If you dare, you can adjust the max number to tease by adjusting the number in the next 2 lines
// ******* WARNING - DO NOT REMOVE/COMMENT OUT THE CHECK! ********
if ($threads > 5)
   $threads = 5;

if ($forum)
{
   $ubbnewspath = $NonCGIPath . "/" . "Forum";
   $threadspath = $ubbnewspath . $forum . "/" . "forum_" . $forum . ".threads";
   if (file_exists($threadspath))
   {
      $thread_data = file($threadspath);
      $thread_count = count($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      array_pop($thread_data);
      $thr_data2 = array_reverse($thread_data);
      array_pop($thr_data2);
      sort($thr_data2);
      $thr_data = array_reverse($thr_data2);
      $thr_start = 0;
      $thr_array = $threads--;
      $real_count = count($thr_data);
      if ($real_count < $thr_array)
      $thr_array = $real_count;
   }
   else
   {
      $thr_array = 0;
      echo "Unable to read .threads file.  Either you are trying to access a private forum, or you need to Rebuild your forum stat files.";
   }
   $count = 0;
   $mereal_count = $real_count;
   
   while($real_count)
   {
       $real_count--;
       $extrame[$real_count] = "";
       $extrameme = $extrame[$real_count];
       $extrathisone = $thr_data[$real_count];
       $extrameme= explode("!", $extrathisone);
       $extrame[$real_count][0] = $extrameme[0];
       $extrame[$real_count][1] = $extrameme[1];
       $extrame[$real_count][2] = $extrameme[2];
       $extrame[$real_count][3] = $extrameme[3];
       $extrame[$real_count][4] = $extrameme[4];
   }
   while($real_count <= $mereal_count)
   {
       $extrame2[$real_count] = "!" . $extrame[$real_count][3] . "!"  . " => " . "!" . $extrame[$real_count][1] . "!";
       $real_count++;
   }
   rsort($extrame2);
   
   $thr_data = $extrame2;
   
   while ($count < $thr_array)
   {
      if ($count > 1)
         echo "

";
      $thisone = $thr_data[$thr_start];
      $getme = explode("!", $thisone);
      $getme2 = $getme[3];
      $topicnum = trim($getme2);
      $maxTextLenght=850;
      $ubbnewspath = $NonCGIPath . "/" . "Forum";
      $newsitem = $ubbnewspath . $forum . "/" . $topicnum . ".cgi";
      $newsdetail = file($newsitem);
      $num_lines = count ($newsdetail);
      $comment_count = $num_lines - 2;
      $aline = explode("&#0124;&#0124;", $newsdetail[0]);
      $zline = explode("&#0124;&#0124;", $newsdetail[1]);
      $author = $aline[8];
      $authorid = $aline[9];
      $authorurl = $NonCGIURL . "/ultimatebb.php?ubb=get_profile;u=" . $authorid;
      $title = $aline[4];
      $postdate = $zline[3];
      $posttime = $zline[4];
      $aspace=" ";
      if(strlen($zline[6]) > $maxTextLenght )
      {
         $postdet = substr(trim($zline[6]),0,$maxTextLenght);
         $postdet = substr($postdet,0,strlen($postdet)-strpos(strrev($postdet),$aspace));
         $bot = strpos($postdet, "<blockquote>");
         $bct = strpos($postdet, "</blockquote>");
         if (($bot!==FALSE) and ($bct===FALSE))
         {
            $postdet = $postdet . "</blockquote>";
            $nodots = "TRUE";
         }
         $lot = strpos($postdet, "<ul");
         $lct = strpos($postdet, "</ul>");
         if (($lot!==FALSE) and ($lct===FALSE))
         {
            $postdet = $postdet . "</ul>";
            $nodots = "TRUE";
         }
         if ($nodots != "TRUE")
            $postdet = $postdet . '...';
      }
      else
      {
         $postdet = $zline[6];
      }
      echo "<b>$title</b>
";
      echo "<font size="1">";
      print("Posted: $postdate $posttime by <a href="$authorurl">$author</a>");
      echo "</font>
";
      echo "
";
      print($postdet);
      $morepath = $NonCGIURL . "/ultimatebb.php?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
      echo "&nbsp;&nbsp;&nbsp;";
      echo "<a href="$morepath">Read More...</a>";
      echo "
";
      $commentpath = $NonCGIURL . "/ultimatebb.php?ubb=reply;f=" . $forum . ";t=" . $topicnum;
      echo "<a href="$commentpath">Comments ($comment_count)</a>

";
      $count++;
      $thr_start++;
   }
}

Top
#199741 - 08/23/05 09:08 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
It looks pretty good, however, it is best to call ultimatebb.cgi and let the UBB decide when to call ultimatebb.php. I do have a more updated version of this, but I haven't released it.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199742 - 08/23/05 09:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Hiya,

Are u gonna add this to that one or the other way around?

Btw, have u got any clue on how to get this php code to run outside a browser but on a command line like this: php-cli ubbnews.php?forum=1

so that one can use cron?

Top
#199743 - 08/23/05 03:07 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Quote:
Originally posted by Sub Zero:

It looks pretty good, however, it is best to call ultimatebb.cgi and let the UBB decide when to call ultimatebb.php. I do have a more updated version of this, but I haven't released it.



:sniff: i want lol... I'm usign the latest public version of this on one of my new sites that i'm planning on opening in sept wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199744 - 09/09/05 01:18 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Well, I found a bug...

I'm running the latest version and for once I'm using the section:
Code:
if ($count > 1)
        echo "

";
(before I left it as "" and used something else, but now i'm going for a more professional look)

What I'm seeing on my dev site is that the first entry ignores
Code:
if ($count > 1)
        echo "

";
Which kind of sucks as I get parts that run together...

Any ideas? This is the only thing that's holding development back right now (well, the only thing i need to worry about anyway); I've been coding up a storm lately...

You can see examples of this error by looking at the "Headlines" section, the first two entries mesh together vs using:
Code:
if ($count > 1)
        echo " &#0124;&#0124; ";
And the "Tech News" section the first two stories mesh together instead of using:
Code:
if ($count > 1)
        echo "

";
(Note that the headlines are generated from a file named "headlines.php" and news from "news.php" so they aren't in the same file)...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199745 - 09/09/05 09:48 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
You might want to verify your changes. The $count > 1 is that way so that it does the 2 line breaks after the 1st iteration of the script. My guess is that $count isn't being incremented during the 1st pass.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199746 - 09/09/05 07:05 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
The only changes I made was to the formatting and the line which is responsible for the amount of stories allowed to pull... I'll get a copy uploaded for you shortly

files
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199747 - 09/10/05 12:06 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Change $count > 1 to $count >= 1. The problem is $count = 0 at first, then gets incremented to 1 and the line break logic doesn't get called.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199748 - 09/10/05 04:44 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ahh, that's looking beautiful; thanks smile ...

Now to go terrorize more php code!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199749 - 09/12/05 12:07 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip File Updated.

Fixes
======
- Fixed the Gizzy $count bug
- Changed the include to require for vars_config.inc.php (Why try to run if you cannot fetch the paths confused )
- Tweaked the internal code documentation
- Cleaned up the formatting of the code for easier reading (I should have done this sooner)
- Switched the URLs to Spider Friendly

I'm going to mark this as a Finished Modification since it does seem rather stable.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199750 - 09/12/05 12:16 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip File Updated again because I forgot to leave the old URL formats in for the 6.4 Users. If you do not want the short URLs or are unable to run with them, you may comment the lines with them and uncomment the lines with the standard URLs.

Example Before:
Code:
		$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
		//$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
Example After:
Code:
		//$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
		$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199751 - 09/12/05 09:16 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Hey SubZero, I'm currently working on a rendition of the body of UBB.News that will provide a valid RSS2.0 feed; would it be allright if I can post the body segment here when completed?

The hardest task is to get a valid date lol, they want it one way whereas it's presented another ;/, too bad that for a valid feed we had to sit and code for a while to get it to output a differant way without modding existing ubb code :/; but we coded a fix for that one wink .
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199752 - 09/12/05 09:37 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I could probably help you out with the date handling Gizzy. I do see that it is tricky. You are probably going to have to do some kludge to get the current server Time Zone and assume that the FudgedOffset is 0. Then again, you could do some math on FudgedOffset from vars_config.inc.php and figure out the new timezone.

Possibly at some point, the RSS 2.0 stuff could either be a "hack" to the code, or we might be able to make some arrangements and ship it as stock behavior. We should probably discuss what we want to do privately if that is something we want to consider smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199753 - 09/13/05 12:26 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Well the timezone for RSS has to be in an exact format; we have a discussion at ugn here on the subject though wink ...

PM me later and i'll get you what i have right now; the only thing not rss2.0 compliant is the date which would be fixed via the forum thread we have going.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199754 - 09/13/05 11:21 AM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
http://www.ianspence.com/?page=rss

smile

First, use the following function

Code:
function convert_date($ubb_time)
{
	return preg_replace("/(d{1,2})-(d{1,2})-(d{4})/", "\3-\1-\2", $ubb_time);
}
Pass in the normal UBB time you get (DATE blank space TIME)

Then
Code:
$date = date( "D, d M Y H:i:s T" , strtotime( convert_date( $day . ' ' . $hour ) ));

Top
#199755 - 09/14/05 01:00 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
Ian, not bad, however it sets the time as "00:00:00" vs the time of the post smirk
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199756 - 09/14/05 01:13 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
are you entering the entire time. by $hour I meant "05:15 PM"

Top
#199757 - 09/14/05 10:51 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I just dropped it in and called it as you said... BTW, "am/pm" isn't in the spec, it's 24 hour time I believe.

SubZero, a reccommendation, instead of commenting the shorturl capabilities why not just add a switch?

Add this to the top:
Code:
// Use ShortURLs? 1 = yes, 0 = no.
	$shorturls = "1";
Then add this before you define your layout:
Code:
			if($shorturls == 1) {
				$authorurl = $CGIURL . "/ultimatebb.cgi/profile/" . $authorid;
				$morepath = $CGIURL . "/ultimatebb.cgi/ubb/get_topic/f/" . $forum . "/t/" . $topicnum;
				$commentpath = $CGIURL . "/ultimatebb.cgi/ubb/reply/f/" . $forum . "/t/" . $topicnum;
			} else {
				$authorurl = $CGIURL . "/ultimatebb.cgi?ubb=get_profile;u=" . $authorid;
				$morepath = $CGIURL . "/ultimatebb.cgi?ubb=get_topic;f=" . $forum . ";t=" . $topicnum;
				$commentpath = $CGIURL . "/ultimatebb.cgi?ubb=reply;f=" . $forum . ";t=" . $topicnum;
			}
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#199758 - 09/14/05 11:27 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
I only did the comment method because it was a quick fix. I will look at adding it as a switch shortly. My schedule is kinda...crappy this week smile
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199759 - 09/15/05 01:09 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ron M Offline
Admin Emeritus

Registered: 11/29/01
Posts: 789
Loc: Des Moines, IA
Zip File Updated
- New optional Query String parameter - surl=1 will enable Short URLs (Requires UBB.classic 6.7.x)
- Fixed some typos in the comments
- Added a few additional comments
- Cleaned up some of the nodots logic

Reverting this back to a beta hack for the time being.
_________________________
http://thegeeksinc.com
[img]http://www.ubbdev.com/ud/?u=Sub_Zero&s=1[/img] points generated

Top
#199760 - 03/28/06 06:11 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Does this do rss 2.0 feeds? I saw someone at ubbcentral requesting the ability.
_________________________
- Allen wavey
- What Drives You?

Top
#199761 - 03/28/06 06:34 PM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] UBBNews PHP Feed
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
really, all you'd need to do is

Code:
header( "Content-type: text/xml" );
and edit the output part to produce valid rss2

Top
Page 1 of 9 1 2 3 4 5 6 7 8 9 >



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks